<div class="contentTitleDark">Otsing</div>
<div class="content" style="background-color:#FEE7EF">
	<form name="forumSearch" action="{$pageUrl}Forum/otsing/" method="post">
	<table>
		<tr>
			<td class="black s11 n" style="width:150px" align="right"><strong>Otsi sõna:</strong> </td>
			<td><input type="black s10 n" name="searchWord" value="{$searchWord}" /></td>
		</tr>
		<tr>
			<td></td>
			<td colspan="2">
				<input type="radio" name="userPosts" value="0" {if $userPosts==0}checked{/if}/> Otsi teemasid <br />
				<input type="radio" name="userPosts" value="1" {if $userPosts==1}checked{/if}/> Otsi kasutaja teemasid
			</td>
		</tr>
		<tr>
			<td class="black s11 n" align="right"><strong>Ainult teemast:</strong></td>
			<td>
				<select name="thread">
					{foreach item=i key=k from=$threads}
						<option value="{$i.id}" {if $thread==$i.id}selected{/if} {if $i.level ==0 && $k!=0}disabled{/if}>{section name=s loop=$i.level}&nbsp;&nbsp;{/section}{$i.value}</option>
					{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td></td>
			<td><input type="submit" name="search" value="Otsi"/></td>
		</tr>
	</table>
	</form>
</div>
<div class="contentTitleDark">Leitud teemad</div>
<div class="content">
	<table cellspacing="1" cellpadding="1" border="0" style="width:100%;">
		<tr style="background-color:#FDECEA; height: 25px;">
			<td class="black s11 b" width="500">Teema</td>
			<td class="black s11 b">Teemat alustati</td>
			<td class="black s11 b">Viimane postitus</td>
		</tr>
	{foreach item=i from=$result}
		<tr style="background-color:{cycle values='#FFFFFF,#F3F3F3'}; height:28px;">
			<td><a href="{$pageUrl}topic/{$i.id}" class="red s11 b">{$i.title}</a></td>
			<td class="lightGrey s10">{$i.date}</td>
			<td class="lightGrey s10">{$i.lastPostTime}</td>
		</tr>
	{foreachelse}
		<tr>
			<td colspan="3"><span class="red s11 b">Ei ole ühtegi tulemust</span></td>
		</tr>
	{/foreach}
	</table>
</div>